from django.test import TestCase

# Create your tests here.
# 简单测试一下 QuerySet 和 manager 管理器
# 需要再ipython里执行：

# 批量添加测试帖子
# for title in range(1,20):
#     posts["title"]="a post {}".format(str(title))
#     posts["slug"]="a post slug{}".format(str(title))
#     posts["body"]="post body is l lot of lines more than 30"
#     posts["author"]=user
#     nice = Post(**posts)
#     nice.save()
#  gets = Post.objects.filter(status = "draft").update(status="published") #批量更新 删除用delate()

# 发送邮件
# from django.core.mail import send_mail
# send_mail('Django mail', 'This e-mail was sent with Django.','2936877795@qq.com', ['2936877795@qq.com'], fail_silently=False)